deploy: Do not prune repository
authorMatthew Barnes <mbarnes@redhat.com>
Tue, 15 Sep 2015 18:40:18 +0000 (14:40 -0400)
committerMatthew Barnes <mbarnes@redhat.com>
Wed, 16 Sep 2015 13:23:37 +0000 (09:23 -0400)
To support deploying older commits:

  ostree pull <remote> <checksum>
  ostree admin deploy <checksum>

Prior to this, the deploy command garbage collected <checksum> since
there's no ref pointing to it, and then ostree_sysroot_deploy_tree()
fails because it can't find the <checksum> commit.

https://bugzilla.gnome.org/732526

src/ostree/ot-admin-builtin-deploy.c

index b054ece4a9b4ec78a15608f10603798606988713..51de4ee35e4db296dc98f0cda3375ae3954a7039 100644 (file)
@@ -119,7 +119,7 @@ ot_admin_builtin_deploy (int argc, char **argv, GCancellable *cancellable, GErro
    * TODO: Add /ostree/transaction file, and only do this cleanup if
    * we find it.
    */
-  if (!ostree_sysroot_cleanup (sysroot, cancellable, error))
+  if (!ostree_sysroot_prepare_cleanup (sysroot, cancellable, error))
     {
       g_prefix_error (error, "Performing initial cleanup: ");
       goto out;